#include <iostream>

using namespace std;

void display(int **array,int n,int m) {
    for (int i = 1; i <=n; ++i) {
        for (int j = 1; j <=m; ++j) {
            array[i][j]=i*j;
            cout<<array[i][j]<<"\t";
        }
        cout<<endl;
    }
}

int main(){
    int n,m;
    cin >> n >> m;
    int** array = new int*[n+1];
    for (int i = 1; i <= n; i++) {
        array[i] = new int[m+1];
    }
    display( array, n+1,m);

    return 0;
}